<?php
namespace Fang\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
*@ORM\Entity
*@ORM\Table(name="userroles")
**/
class UserRoles
{
  /**
  *@ORM\Column(type="integer")
  *@ORM\Id
  *@ORM\GeneratedValue(strategy="AUTO")
  **/
  private $id;
  /**
  *关联角色表
  *@ORM\ManyToOne(targetEntity="Roles")
  *@ORM\JoinColumn(name="rid", referencedColumnName="rid")
  *@ORM\Column(type="integer")
  **/
  private $rid;
  /**
  *关联主账户用户
  *@ORM\ManyToOne(targetEntity="User")
  *@ORM\JoinColumn(name="uid", referencedColumnName="id")
  *@ORM\Column(type="integer")
  **/
  private $uid;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set rid
     *
     * @param integer $rid
     * @return UserRoles
     */
    public function setRid($rid)
    {
        $this->rid = $rid;

        return $this;
    }

    /**
     * Get rid
     *
     * @return integer 
     */
    public function getRid()
    {
        return $this->rid;
    }

    /**
     * Set uid
     *
     * @param integer $uid
     * @return UserRoles
     */
    public function setUid($uid)
    {
        $this->uid = $uid;

        return $this;
    }

    /**
     * Get uid
     *
     * @return integer 
     */
    public function getUid()
    {
        return $this->uid;
    }
}
